package Day22;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-10-13
 * Time: 17:46
 * To BE A Better Person-2020-3-2
 */
public class TestDemo2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[] arr=new int[26];
        String s=sc.next();
        ArrayList<Character> arr2=new ArrayList<>();
        int index2=0;
        for (int i = 0; i < s.length(); i++) {
            arr[s.charAt(i)-97]++;
        }
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 1){
                arr2.add((char)(i+97));
                index2++;
            }
        }
        for (int i = 0; i < s.length(); i++) {
            if(arr2.contains(s.charAt(i))){
                System.out.println(s.charAt(i));
                return;
            }
            //hhhh
        }
        System.out.println(-1);
    }
}
